﻿	
create proc sp_xoadoituong
@MaKH int
as
declare @dem as int
select @dem=count(*) from danhmuc_doituong where MaKH=@MaKH
if(@dem>0)
	begin
	delete from danhmuc_doituong where MaKH=@MaKH
	select ErroCode=1
	end
else
	begin
	select ErroCode=0
	end